package com.zh.business.config.forest;

import com.dtflys.forest.annotation.DataParam;
import com.dtflys.forest.annotation.Request;

/**
 * 描述: http框架 forest 请求网页
 *  微信小程序登录
 *
 * @author: yanglin
 * @Date: 2021-08-17-11:52
 * @Version: 1.0
 */
public interface WeChatClent {

    /**
     * 根据code换取session_key和openid
     * @return
     */
    @Request(
            url = "https://api.weixin.qq.com/sns/jscode2session?grant_type=authorization_code",
            type = "GET"
    )
    String getJsCode2Session(@DataParam("appid") String appId,
                             @DataParam("secret") String appSecret,
                             @DataParam("js_code") String jsCode);
}
